//
//  WL_Launch_ViewController.m
//  ZYW_MIT
//
//  Created by James on 2018/8/9.
//  Copyright © 2018年 Wang. All rights reserved.
//

#import "WL_Launch_ViewController.h"

#import "UIImage+GIFS.h"

#import "AppDelegate.h"

#import "LLGifImageView.h"
#import "LLGifView.h"


@interface WL_Launch_ViewController ()

@property (nonatomic, strong) LLGifView *gifView;

@property (nonatomic, strong) LLGifImageView *gifImageView;

@end

@implementation WL_Launch_ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    NSData *localData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"launch_home" ofType:@"gif"]];
    
    UIImage *image = [[UIImage alloc] initWithData:localData];
    
    self.view.backgroundColor=[UIColor colorWithPatternImage:image];
    
     _gifView = [[LLGifView alloc] initWithFrame:CGRectMake(0,0, ScreenWidth, ScreenHeight) data:localData];
    
    [self.view addSubview:_gifView];
    
     [_gifView startGif];
    
    AppDelegate * appDelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;

    [appDelegate performSelector:@selector(gotoMain) withObject:nil afterDelay:2.5];

}





- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    
}



@end
